package cn.com.server.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;

import cn.com.server.dao.StorehouseDao;
import cn.com.server.entity.Storehouse;
import cn.com.server.service.StorehouseService;
import cn.com.server.extend.model.StorehouseModel;

@Service
public class StorehouseServiceImp implements StorehouseService{
	
	@Autowired
	private StorehouseDao dao;
	
	@Override
	public Page<Storehouse> selectStorehouse(StorehouseModel model) {
		PageHelper.startPage(model.getPage(), model.getLimit());
		Page<Storehouse> pageData = dao.selectStorehouse(model);
		return pageData;
	}

	@Override
	public int insert(Storehouse entity) {
		return dao.insert(entity);
	}

	@Override
	public int update(Storehouse entity) {
		return dao.update(entity);
	}
	
	@Override
	public int updateDeleteIds(String ids) {
		return dao.updateDeleteIds(ids);
	}

}
